package com.itheima.controller;

import com.itheima.doman.Result;
import com.itheima.doman.pojo.OperateLog;
import com.itheima.doman.pojo.PageResult;
import com.itheima.service.LogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j

public class LogController {
    @Autowired
    private LogService logService;
    @GetMapping("/log/page")
    public Result logPage(@RequestParam Integer  page, @RequestParam Integer pageSize) {
       PageResult<OperateLog> pageResult = logService.logPage(page, pageSize);
        return Result.success(pageResult);
    }
}
